From: Florian Müllner Date: Tue, 29 Oct 2019 13:01:07 +0000 (+0100) Subject: extensionPrefs: Trick xgettext into accepting odd number of backticks X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~493 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=10b2083d3e34cd332d6152526baf9dadbdf9b103;p=gnome-shell.git extensionPrefs: Trick xgettext into accepting odd number of backticks Xgettext learned about template strings now, which is good. However it's still buggy, so instead of the "classic" xgettext issue with backticks, we now have exciting new issues to find work-arounds for. One issue is that it doesn't detect backticks inside string constants as regular characters, so having an odd number of backticks throws off its regex. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792 --- diff --git a/js/extensionPrefs/main.js b/js/extensionPrefs/main.js index 9c5e3ecc0..86afa34ee 100644 --- a/js/extensionPrefs/main.js +++ b/js/extensionPrefs/main.js @@ -159,14 +159,14 @@ var Application = GObject.registerClass({ // markdown for pasting in gitlab issues let lines = [ `The settings of extension ${row.uuid} had an error:`, - '```', + '```', // '`' (xgettext throws up on odd number of backticks) `${exc}`, - '```', + '```', // '`' '', 'Stack trace:', - '```', + '```', // '`' exc.stack.replace(/\n$/, ''), // stack without trailing newline - '```', + '```', // '`' '' ]; clipboard.set_text(lines.join('\n'), -1);